package com.st.valid.jsr3.groupValid.entity;
import com.st.valid.jsr3.groupValid.mark.AddGroup;
import com.st.valid.jsr3.groupValid.mark.UpdateGroup;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.*;
/**
 * @创建人: 放生
 * @创建时间: 2022/4/2
 * @描述:
 */
@lombok.Data
public class GroupRequestVo {

    /**
     * 主键id
     * @mock 12356
     */
    @NotNull(message = "修改必须指定id",groups = {UpdateGroup.class})
    @Null(message = "新增不能指定id",groups = {AddGroup.class})
    private Long id;

    /**
     * 用户年龄
     * @mock 30
     */
    @Min(value = 10, message = "年龄必须大于等于10岁",groups = {UpdateGroup.class,AddGroup.class})
    private Integer age;

    /**
     * 用户的名字
     * @mock 陆小凤
     */
    @Length(min = 5, max = 20, message = "名字的长度必须在5-10之间",groups = {UpdateGroup.class,AddGroup.class})
    private String name;

    /**
     * 用户的 email
     * @mock fangsheng@163.com
     * @required
     */
    @Email(message = "email format is error",groups = {UpdateGroup.class,AddGroup.class})
    private String email;

    /**
     * 用户的地址
     * @mock 上海市，普陀区，桃浦镇
     * @required
     */
    @NotBlank(message = "地址不能为空",groups = {UpdateGroup.class})
    private String address;


}